home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / boxes / prctvb25 / pexample.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-01-20  |  7.1 KB  |  219 lines

  1. VERSION 2.00
  2. Begin Form PExamples 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Percent Examples"
  6.    ClientHeight    =   4140
  7.    ClientLeft      =   2430
  8.    ClientTop       =   2940
  9.    ClientWidth     =   5565
  10.    Height          =   4545
  11.    Left            =   2370
  12.    LinkTopic       =   "Form2"
  13.    MDIChild        =   -1  'True
  14.    ScaleHeight     =   4140
  15.    ScaleWidth      =   5565
  16.    Top             =   2595
  17.    Width           =   5685
  18.    Begin PRCNT Prcnt3 
  19.       AutoRedraw      =   -1  'True
  20.       AVersion        =   2.501
  21.       BackColor       =   &H00C0C0C0&
  22.       BarBorder       =   0
  23.       BarInner        =   0
  24.       BarOuter        =   1
  25.       BevelInner      =   1  ' 1 - Raised
  26.       BevelOuter      =   2  ' 2 - Inset
  27.       BevelWidth      =   2
  28.       BorderWidth     =   2
  29.       CaptionID       =   0
  30.       Captions        =   0
  31.       Direction       =   1  ' 1 - Backward
  32.       DisplayMode     =   0  ' 0 - Linear
  33.       FontID          =   0
  34.       Height          =   2355
  35.       Left            =   4620
  36.       Max             =   100
  37.       Min             =   0
  38.       MouseControl    =   -1  'True
  39.       OffColor        =   &H00FFFF00&
  40.       OnColor         =   &H000000C0&
  41.       Orientation     =   1  ' 1 - Vertical
  42.       Percent         =   50
  43.       PercentColor    =   &H00000000&
  44.       PercentFontID   =   0
  45.       PercentStyle    =   0  ' 0 - On/Off Negative
  46.       Shape           =   ""
  47.       ShapeStyle      =   0  ' 0 - Rectangle
  48.       TabIndex        =   3
  49.       Top             =   120
  50.       Value           =   50
  51.       Width           =   795
  52.       ZLoad           =   PEXAMPLE.FRX:0000
  53.    End
  54.    Begin PRCNT Prcnt2 
  55.       AutoRedraw      =   -1  'True
  56.       AVersion        =   2.501
  57.       BackColor       =   &H00C0C0C0&
  58.       BarBorder       =   0.05
  59.       BarInner        =   0.3
  60.       BarOuter        =   0.6
  61.       BevelInner      =   2  ' 2 - Inset
  62.       BevelOuter      =   1  ' 1 - Raised
  63.       BevelWidth      =   3
  64.       BorderWidth     =   1
  65.       CaptionID       =   1
  66.       Captions        =   2
  67.       Direction       =   0  ' 0 - Forward
  68.       DisplayMode     =   0  ' 0 - Linear
  69.       FontID          =   0
  70.       Height          =   1350
  71.       Left            =   300
  72.       Max             =   100
  73.       Min             =   0
  74.       MouseControl    =   -1  'True
  75.       OffColor        =   &H00FFFFFF&
  76.       OnColor         =   &H006E0000&
  77.       Orientation     =   0  ' 0 - Horizontal
  78.       Percent         =   30
  79.       PercentColor    =   &H00000000&
  80.       PercentFontID   =   0
  81.       PercentStyle    =   0  ' 0 - On/Off Negative
  82.       Shape           =   ""
  83.       ShapeStyle      =   0  ' 0 - Rectangle
  84.       TabIndex        =   2
  85.       Top             =   2670
  86.       Value           =   30
  87.       Width           =   5220
  88.       ZLoad           =   PEXAMPLE.FRX:003A
  89.    End
  90.    Begin PRCNT Prcnt1 
  91.       AutoRedraw      =   -1  'True
  92.       AVersion        =   2.501
  93.       BackColor       =   &H00404000&
  94.       BarBorder       =   0.05
  95.       BarInner        =   0.1
  96.       BarOuter        =   0.9
  97.       BevelInner      =   2  ' 2 - Inset
  98.       BevelOuter      =   2  ' 2 - Inset
  99.       BevelWidth      =   2
  100.       BorderWidth     =   1
  101.       CaptionID       =   0
  102.       Captions        =   0
  103.       Direction       =   1  ' 1 - Backward
  104.       DisplayMode     =   1  ' 1 - Radial
  105.       FontID          =   0
  106.       Height          =   2460
  107.       Index           =   1
  108.       Left            =   270
  109.       Max             =   100
  110.       Min             =   0
  111.       MouseControl    =   -1  'True
  112.       OffColor        =   &H00FFFFFF&
  113.       OnColor         =   &H006E0000&
  114.       OnPicture       =   PEXAMPLE.FRX:0126
  115.       Orientation     =   1  ' 1 - Vertical
  116.       Percent         =   75
  117.       PercentColor    =   &H00000000&
  118.       PercentFontID   =   0
  119.       PercentStyle    =   2  ' 2 - None
  120.       Shape           =   ""
  121.       ShapeStyle      =   1  ' 1 - Ellipse
  122.       TabIndex        =   1
  123.       Top             =   60
  124.       Value           =   75
  125.       Width           =   2340
  126.       ZLoad           =   PEXAMPLE.FRX:56F0
  127.    End
  128.    Begin PRCNT Prcnt1 
  129.       AutoRedraw      =   -1  'True
  130.       AVersion        =   2.501
  131.       BackColor       =   &H00C0C0C0&
  132.       BarBorder       =   0.1
  133.       BarInner        =   0
  134.       BarOuter        =   1
  135.       BevelInner      =   0  ' 0 - None
  136.       BevelOuter      =   0  ' 0 - None
  137.       BevelWidth      =   2
  138.       BorderWidth     =   2
  139.       CaptionID       =   0
  140.       Captions        =   2
  141.       Direction       =   1  ' 1 - Backward
  142.       DisplayMode     =   0  ' 0 - Linear
  143.       FontID          =   0
  144.       Height          =   2460
  145.       Index           =   0
  146.       Left            =   2760
  147.       Max             =   100
  148.       Min             =   0
  149.       MouseControl    =   -1  'True
  150.       OffColor        =   &H00404040&
  151.       OnColor         =   &H006E0000&
  152.       Orientation     =   1  ' 1 - Vertical
  153.       Percent         =   60
  154.       PercentColor    =   &H00808080&
  155.       PercentFontID   =   0
  156.       PercentStyle    =   1  ' 1 - PercentColor
  157.       Shape           =   ""
  158.       ShapeStyle      =   2  ' 2 - Tank
  159.       TabIndex        =   0
  160.       Top             =   60
  161.       Value           =   60
  162.       Width           =   1695
  163.       ZLoad           =   PEXAMPLE.FRX:572A
  164.    End
  165.    Begin Timer Timer1 
  166.       Interval        =   100
  167.       Left            =   90
  168.       Top             =   2790
  169.    End
  170. Dim inittime As Integer
  171. Sub Form_Load ()
  172.     Call initvar
  173.     prcnt1(1).OnPicture = PBitmap.Image1(1).Picture
  174.     Unload PBitmap
  175.     prcnt2.CaptionID = 1
  176.     prcnt2.Caption = "You have selected 4 files for downloading..."
  177. End Sub
  178. Sub initvar ()
  179.     inittime = -20
  180. End Sub
  181. Sub Prcnt2_Change ()
  182.     If prcnt2 = 100 Then
  183.         text1 = "DownLoad Complete"
  184.     ElseIf prcnt2 > 75 And prcnt2 < 100 Then
  185.         text1 = "DownLoading Last File"
  186.     ElseIf prcnt2 > 50 And prcnt2 < 76 Then
  187.         text1 = "DownLoading Third File"
  188.     ElseIf prcnt2 > 25 And prcnt2 < 51 Then
  189.         text1 = "DownLoading Second File"
  190.     ElseIf prcnt2 < 25 And prcnt2 > 0 Then
  191.         text1 = "DownLoading First File"
  192.     Else
  193.         text1 = "You have selected 4 files for downloading..."
  194.     End If
  195. End Sub
  196. Sub Timer1_Timer ()
  197.     inittime = inittime + 1
  198.     prcnt2 = inittime
  199.     If inittime > 110 Then inittime = -20
  200.     prcnt2.CaptionID = 0
  201.     If prcnt2 = 100 Then
  202.         prcnt2.CaptionID = 1
  203.         prcnt2.Caption = "DownLoad Complete"
  204.     ElseIf prcnt2 > 75 And prcnt2 < 100 Then
  205.         prcnt2.Caption = "DownLoading File 4"
  206.     ElseIf prcnt2 > 50 And prcnt2 < 76 Then
  207.         prcnt2.Caption = "DownLoading File 3"
  208.     ElseIf prcnt2 > 25 And prcnt2 < 51 Then
  209.         prcnt2.Caption = "DownLoading File 2"
  210.     ElseIf prcnt2 < 26 And prcnt2 > 0 Then
  211.         prcnt2.Caption = "DownLoading File 1"
  212.     Else
  213.         prcnt2.CaptionID = 1
  214.         prcnt2.Caption = "You have selected 4 files for downloading..."
  215.     End If
  216.     prcnt1(0) = prcnt1(0) + Rnd * 2 - 1
  217.     prcnt1(1) = prcnt1(1) + Rnd * 2 - 1
  218. End Sub
  219.